package com.dao;

import com.pojo.District;
import org.mybatis.spring.SqlSessionTemplate;

import java.util.List;

public class DistrictDaoImpl implements DistrictDao {
    private SqlSessionTemplate sqlSession;

    public void setSqlSession(SqlSessionTemplate sqlSession) {
        this.sqlSession = sqlSession;
    }

    public List<District> query() {
        DistrictDao districtDao = sqlSession.getMapper(DistrictDao.class);
        return districtDao.query();
    }
}
